<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>{% block title %}{% endblock %}</title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.7 -->
  <link rel="stylesheet" href="{% static 'adminlte/bower_components/bootstrap/dist/css/bootstrap.min.css' %}">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="{% static 'adminlte/bower_components/font-awesome/css/font-awesome.min.css' %}">
  <!-- Theme style -->
  <link rel="stylesheet" href="{% static 'adminlte/dist/css/AdminLTE.min.css' %}">
  <!-- AdminLTE Skins. Choose a skin from the css/skins
       folder instead of downloading all of them to reduce the load. -->
  <link rel="stylesheet" href="{% static 'adminlte/dist/css/skins/_all-skins.min.css' %}">
  <!-- bootstrap wysihtml5 - text editor -->
  <link rel="stylesheet" href="{% static 'adminlte/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css' %}">
    <link rel="stylesheet" href="{% static 'sweetalert/sweetalert.css' %}">
  <!-- jQuery 3 -->
  <script src="{% static 'adminlte/bower_components/jquery/dist/jquery.min.js' %}"></script>
  <!-- Bootstrap 3.3.7 -->
  <script src="{% static 'adminlte/bower_components/bootstrap/dist/js/bootstrap.min.js' %}"></script>
  <!-- Bootstrap WYSIHTML5 -->
  <script src="{% static 'adminlte/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js' %}"></script>
  <!-- AdminLTE App -->
  <script src="{% static 'adminlte/dist/js/adminlte.min.js' %}"></script>
  <script src="{% static 'sweetalert/sweetalert.min.js' %}"></script>
  <script src="{% static 'js/xfzajax.min.js' %}"></script>
  <script src="{% static 'js/xfzalert.min.js' %}"></script>
  <script src="{% static 'js/message.min.js' %}"></script>
    {% block header %}{% endblock %}

</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

  <header class="main-header">
    <!-- Logo -->
    <a href="index2.html" class="logo">
      <!-- mini logo for sidebar mini 50x50 pixels -->
      <span class="logo-mini"><b>C</b>MS</span>
      <!-- logo for regular state and mobile devices -->
      <span class="logo-lg"><b>小饭桌后台管理系统</b></span>
    </a>
    <!-- Header Navbar: style can be found in header.less -->
    <nav class="navbar navbar-static-top">
      <!-- Sidebar toggle button-->
      <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
        <span class="sr-only">Toggle navigation</span>
      </a>

      <div class="navbar-custom-menu">
        <ul class="nav navbar-nav">
          <li class="dropdown user user-menu">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
              <img src="https://s.stu.126.net/res/images/headImg/small.jpg" class="user-image" alt="User Image">
              <span class="hidden-xs">唐文杰</span>
            </a>
            <ul class="dropdown-menu">
              <!-- User image -->
              <li class="user-header">
                <img src="https://s.stu.126.net/res/images/headImg/small.jpg" class="img-circle" alt="User Image">
                <p>
                  唐文杰
                  <small>Python web开发工程师</small>
                </p>
              </li>
              <!-- Menu Footer-->
              <li class="user-footer">
                <div class="pull-left">
                  <a href="#" class="btn btn-default btn-flat">个人中心</a>
                </div>
                <div class="pull-right">
                  <a href="#" class="btn btn-default btn-flat">退出登录</a>
                </div>
              </li>
            </ul>
          </li>
        </ul>
      </div>
    </nav>
  </header>

  <aside class="main-sidebar">
    <!-- sidebar: style can be found in sidebar.less -->
    <section class="sidebar">
      <!-- search form -->
      <form action="#" method="get" class="sidebar-form">
        <div class="input-group">
          <input type="text" name="q" class="form-control" placeholder="搜索">
          <span class="input-group-btn">
                <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
                </button>
              </span>
        </div>
      </form>
      <!-- /.search form -->
      <!-- sidebar menu: : style can be found in sidebar.less -->
      <ul class="sidebar-menu" data-widget="tree">
        <li class="active">
            <a href="{% url 'cms:index' %}">
                <i class="fa fa-home"></i>
                <span>首页</span>
            </a>
        </li>
        {% if perms.cms.change_news %}
            <li class="header">新闻管理</li>
            <li>
                <a href="{% url 'cms:news_list' %}">
                    <i class="fa fa-list"></i>
                    <span>新闻列表</span>
                </a>
            </li>
            <li>
                <a href="{% url 'cms:write_news' %}">
                    <i class="fa fa-edit"></i>
                    <span>发布新闻</span>
                </a>
            </li>
            <li>
                <a href="{% url 'cms:news_category' %}">
                    <i class="fa fa-tag"></i>
                    <span>新闻分类</span>
                </a>
            </li>
            <li>
                <a href="{% url 'cms:banners' %}">
                    <i class="fa fa-window-restore"></i>
                    <span>轮播图</span>
                </a>
            </li>
        {% endif %}
        {% if perms.course.change_course %}
            <li class="header">课程管理</li>
            <li>
                <a href="{% url 'cms:pub_course' %}">
                    <i class="fa fa-tv"></i>
                    <span>发布课程</span>
                </a>
            </li>
        {% endif %}
        {% if user.is_superuser %}
            <li class="header">员工管理</li>
            <li>
                <a href="{% url 'cms:staffs' %}">
                    <i class="fa fa-group"></i>
                    <span>员工管理</span>
                </a>
            </li>
        {% endif %}
      </ul>
    </section>
    <!-- /.sidebar -->
  </aside>

  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        {% block content-herder %}{% endblock %}
    </section>

    <!-- Main content -->
    <section class="content">
        {% block content %}{% endblock %}
    </section>
    <!-- /.content -->
  </div>

  <footer class="main-footer">
        <strong>小饭桌</strong>后台管理系统
  </footer>

</div>
<!-- ./wrapper -->

</body>
</html>
